package imos;

import javax.media.j3d.Transform3D;
import javax.vecmath.Point3f;
import javax.vecmath.Vector3f;

/**
 * An act is the association of a schema with the feedback the agent receives 
 * when trying to enact that schema.    
 * The term Act and the term interaction are used indifferently.  
 * @author mcohen
 * @author ogeorgeon
 */
public interface IAct  extends Comparable<IAct>
{
	/**
	 * @return The act's enaction status. True for success, false for failure.
	 */
	public boolean getStatus();
	
	/**
	 * @return The act's string representation.
	 */
	public String getLabel();
	
	/**
	 * @return The act's satisfaction value.
	 */
	public int getSatisfaction();
	
	/**
	 * @param s The act's satisfaction value.
	 */
	public void setSatisfaction(int s);
	
	/**
	 * @param c The act's confidence status.
	 */
	public void setConfidence(int c);
	
	/**
	 * @param s The schema that prescribes this act during enaction.
	 */
	public void setPrescriberSchema(ISchema s);
	
	/**
	 * @param a The act's activation value
	 */
	public void setActivation(int a);
	
	/**
	 * @return The schema that prescribed this act during enaction.
	 */
	public ISchema getPrescriberSchema();
	
	/**
	 * @return the act's schema.
	 */
	public ISchema getSchema();

	/**
	 * @return The confidence status .
	 */
	public int getConfidence();

	/**
	 * @return The act's activation value.
	 */
	public int getActivation();

	/**
	 * @return The act's length (eigher its schema's length or 1 if the act has no schema).
	 */
	public int getLength();
	
	/**
	 * Methods related to space.
	 * @param color The color used to display this interaction.
	 */	
	public void setColor(int color);

	
	/**
	 * @return The color used to display this interaction.
	 */
	public int getColor();
	
	/**
	 * @param position The position of the phenomena that is concerned by the enaction of this act.
	 */
	public void setPosition(Point3f position);
	
	/**
	 * @return The position of the phenomena that is concerned by the enaction of this act.
	 */
	public Point3f getPosition();
	
	/**
	 * If this act concerns only one place then it can be an element of a compresence at this place.
	 * TODO improve the management of bundles.
	 * @return true if this act concerns only one place. 
	 */
	public boolean concernOnePlace();
	
	/**
	 * @param transform The transformation in spatial memory generated by this act.
	 * (Inverse of the displacement of the agent in the environment caused by this act)
	 */
	public void setTransform(Transform3D transform);
	
	/**
	 * @return The transformation in spatial memory generated by this act.
	 * (Inverse of the displacement of the agent in the environment caused by this act)
	 */
	public Transform3D getTransform();	
	
	/**
	 * @param effectLabel The effect code of this act.
	 */
	public void setEffectLabel(String effectLabel);
	
	/**
	 * @return The effect code of this act.
	 */
	public String getEffectLabel();
}
